package com.dingding.facde.activity.service;

import com.dingding.common.core.base.dto.FacadeResult;
import com.dingding.common.core.beans.UserLogin;
import com.dingding.facde.activity.dto.commonactivity.ReqGetActivityIndex;
import com.dingding.facde.activity.dto.commonactivity.ReqGetInviteInfo;
import com.dingding.facde.activity.dto.commonactivity.ReqRegFromActivity;
import com.dingding.facde.activity.dto.commonactivity.ReqStartAnActivity;
import com.dingding.facde.activity.dto.commonactivity.ReqStartToRegIndex;
import com.dingding.facde.activity.dto.commonactivity.ResGetActivityIndex;
import com.dingding.facde.activity.dto.commonactivity.ResGetInviteInfo;
import com.dingding.facde.activity.dto.commonactivity.ResRegFromActivity;
import com.dingding.facde.activity.dto.commonactivity.ResStartAnActivity;
import com.dingding.facde.activity.dto.commonactivity.ResStartToRegIndex;

/**
 * @Description:通用活动的接口
 * @author fengshuonan
 * @date 2016年9月20日 下午3:34:55
 * @version 叮叮搭车
 * @since 2.4
 */
public interface ICommonActivityFacade {
	
	/**
	 * @Description:获取活动首页的详细信息接口
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<ResGetActivityIndex> getActivityIndexInfo(ReqGetActivityIndex reqGetActivityIndex);
	
	/**
	 * @Description:发起活动
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<ResStartAnActivity> startAnActivity(ReqStartAnActivity reqStartAnActivity);
	
	/**
	 * @Description:是否发起过某个活动 
	 * @param userId 用户id
	 * @param activityId 活动id
	 * @author fengshuonan
	 * @return Boolean true 发起过  false 没发起过
	 * @since 2.4
	 */
	public FacadeResult<Boolean> isStartedAnActivity(String userId,String activityId);
	
	/**
	 * @Description:获取已发起活动的用户的邀请详情
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<ResGetInviteInfo> getInviteInfo(ReqGetInviteInfo reqGetInviteInfo);
	
	/**
	 * @Description:活动注册
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<ResRegFromActivity> regFromActivity(ReqRegFromActivity reqRegFromActivity);
	
	/**
	 * @Description:跳转到注册主页的逻辑
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<ResStartToRegIndex> startToRegIndex(ReqStartToRegIndex reqStartToRegIndex);
	
	/**
	 * @Description:发送短信验证码
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<Boolean> sendPhoneMsg(String telephone);

	/**
	 * @Description:openId是否存在于数据库中
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<Boolean> isOpenIdInDb(String openId);

	/**
	 * @Description:获取用户登录信息通过openId
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<UserLogin> getUserLoginByOpenId(String openId);
	
	/**
	 * @Description:验证手机号验证码是否正确
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<Boolean> validateTeleCode(String telephone,String code);
	
	/**
	 * @Description:通过电话号获取用户登录信息
	 * @author fengshuonan
	 * @since 2.4
	 */
	public FacadeResult<UserLogin> getUserLoginByTele(String telephone);

	/**
	 * @Description:发放优惠券的活动注册
	 * @author fengshuonan
	 * @since 2.4
	 */
	FacadeResult<ResRegFromActivity> regFromCoupon(ReqRegFromActivity reqRegFromActivity);
	
	/**
	 * @Description 领取优惠券
	 * @author fengshuonan
	 */
	FacadeResult<ResRegFromActivity> getCoupon(String userId,String shareKey);
}
